package model

// DeviceStatus 定义设备状态
type DeviceStatus int8

const (
	DEV_STATUS_ONLINE   DeviceStatus = iota + 1 // 在线
	DEV_STATUS_OFFLINE                          // 离线
	DEV_STATUS_FAULTED                          // 故障
	DEV_STATUS_AUTOTEST                         // 使用
)

func (own DeviceStatus) String() string {
	switch own {
	case DEV_STATUS_ONLINE:
		return "online"
	case DEV_STATUS_OFFLINE:
		return "offline"
	case DEV_STATUS_FAULTED:
		return "faulted"
	case DEV_STATUS_AUTOTEST:
		return "autotest"
	default:
		return "unknown"
	}
}
